package com.lxf.clouduser.controller;

import com.alibaba.fastjson.JSONObject;
import com.lxf.clouduser.service.DeepSeekService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @author 罗兴发
 * @data 2025/2/20 15:42
 * @description：接入Deepseek-控制类
 */
@RestController
@CrossOrigin  //跨域
@RequestMapping("/v1")
@Slf4j
public class DeepSeekController {
    @Resource
    DeepSeekService deepSeekService;

    /**
     * DeepSeek AI智能助手
     * @param json
     * @return
     */
    @PostMapping("/AIChat")
    public String AIChat(@RequestBody JSONObject json) {

        return deepSeekService.callDeepSeek(json);
    }


}
